CFLAGS=$(INC) #-g -Wall 
CXXFLAGS=$(INC) #-g -Wall 
CPPFLAGS=#-g -Wall
CC=gcc
LIBS=-llog4cplus -lcurl -lnqdls
INC=-I../3rdparty_include/tinyxml 

all: dynamic_parser.cgi scan_server

OBJECT = CmdServer.o \
		 ScanCmd.o \
		 server_main.o \
         PubFunc.o \
		 NqLog.o \
         NqSocket.o \
         CmdClientSocket.o \
         Config.o \
		 startcheck.o \
		 MutexInteger.o \
         ../3rdparty_include/tinyxml/tinystr.o \
         ../3rdparty_include/tinyxml/tinyxmlerror.o \
         ../3rdparty_include/tinyxml/tinyxmlparser.o \
         ../3rdparty_include/tinyxml/tinyxml.o

OBJECT2 = cgic.o dynamic_main.o

dynamic_parser.cgi: $(OBJECT2)
	gcc $(OBJECT2) -o dynamic_parser.cgi $(LIBS) $(INC)


scan_server: $(OBJECT)
	g++ $(CXXFLAGS) -o scan_server $(OBJECT) $(LIBS) $(INC)

install:
	cp ./dynamic_parser.cgi /var/www/cgi-bin/ -f
	cp ./scan_server /opt/Ad_APP/ -f


clean:
	rm -f *.o dynamic_parser.cgi scan_server
	rm -f  ../3rdparty_include/tinyxml/tinystr.o
	rm -f  ../3rdparty_include/tinyxml/tinyxmlerror.o
	rm -f  ../3rdparty_include/tinyxml/tinyxmlparser.o
	rm -f  ../3rdparty_include/tinyxml/tinyxml.o


